﻿<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    xmlns:v="clr-namespace:ShredTheLog.Views;assembly=ShredTheLog.Views"
    xmlns:vm="clr-namespace:ShredTheLog.ViewModels;assembly=ShredTheLog.ViewModels"
    xmlns:cnv="clr-namespace:ShredTheLog.Converters;assembly=ShredTheLog.Converters"
    xmlns:c="clr-namespace:ShredTheLog.Controls;assembly=ShredTheLog.Controls"
    >

    <Style x:Key="MessageHeaderStyle" TargetType="{x:Type Inline}">
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Foreground">
            <Setter.Value>
                <Binding Path="IsMyMessage" Converter="{x:Static cnv:IifConverter.Default}">
                    <Binding.ConverterParameter>
                        <x:Array Type="{x:Type Brush}">
                            <SolidColorBrush Color="#AA4400"/>
                            <SolidColorBrush Color="#0044CC"/>
                        </x:Array>
                    </Binding.ConverterParameter>
                </Binding>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type vm:NameSpan}" BasedOn="{StaticResource MessageHeaderStyle}"/>

    <Style TargetType="{x:Type c:MessageTimeRun}" BasedOn="{StaticResource MessageHeaderStyle}"/>

    <Style TargetType="{x:Type vm:MessageSpan}">
        <Setter Property="Foreground">
            <Setter.Value>
                <Binding Path="IsMyMessage" Converter="{x:Static cnv:IifConverter.Default}">
                    <Binding.ConverterParameter>
                        <x:Array Type="{x:Type Brush}">
                            <SolidColorBrush Color="#BB5511"/>
                            <SolidColorBrush Color="#2277AA"/>
                        </x:Array>
                    </Binding.ConverterParameter>
                </Binding>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type c:TranslationRun}">
        <Setter Property="FontSize" Value="10"/>
        <Setter Property="FontStyle" Value="{x:Static FontStyles.Italic}"/>
        <Setter Property="Foreground" Value="#D02277AA"/>
    </Style>

</ResourceDictionary>